home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Graphics / SoftCinema / Install_SoftCinema < prev    next >
Encoding:
Text File  |  2001-04-05  |  12.9 KB  |  393 lines

  1. ;$VER: Install_SoftCinema (2001-01-28)
  2. ;by Sebastian Huebner <cyco@baud.de>
  3. ;this is a part of the SoftCinema Distribution: SHAREWARE!
  4.  
  5.  
  6. (set #scversion   "0.11b (2000-01-24)")
  7.  
  8. (set #keyfilename "S:SoftCinema.key")
  9. (set #mainprogdir "SYS:Utilities")
  10. (set #docudir     "HELP:")
  11.  
  12. (set #mainprogfile "SoftCinema")
  13. (set #docuenglish  "SoftCinema_English.guide") 
  14. (set #docufrench   "SoftCinema_Français.guide") 
  15. (set #docupolski   "SoftCinema_Polski.guide") 
  16. (set #regienglish  "Register_form.eng") 
  17. (set #regipolski   "Register_form.pl")
  18. (set #datadir      "codecs") 
  19.  
  20.  
  21. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  22. ; #choices-default: %fedcba
  23. ;
  24. ; a - main program
  25. ;
  26. ; b - english guide
  27. ; c - french guide
  28. ; d - polski guide
  29. ;
  30. ; e - english registration form
  31. ; f - polski registration form
  32.  
  33.  
  34. ;main program, english guide, english registration form
  35. (set #choices-default-english %010011)
  36.  
  37. ;main program, french guide,  english registration form
  38. (set #choices-default-french  %010101)
  39.  
  40. ;main program, polski guide,  polski registration form
  41. (set #choices-default-polski  %101001)
  42.  
  43. ;remove default choices for registration forms
  44. (set #choices-default-noregi  %001111)
  45.  
  46. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  47. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  49.  
  50. (complete 0)
  51.  
  52. ;~~~~~~~~~~~~~~~~~~english texts~~~~~~~~~~~~~~~~~~
  53.  
  54.     (set #introduction
  55.       (cat  "\n"
  56.             "Wellcome to\n"
  57.             "\n"
  58.             "\n"
  59.             "»»» " @app-name " «««\n"
  60.             "\n"
  61.             "\The Ultimate Movie Player for PPC Amigas\n"
  62.             "\n"
  63.             "by Jacek Cybularczyk <noe@webnet.pl>\n"
  64.             "\n"
  65.             "\n"
  66.             "\n"
  67.             "\nVersion to Install: " #scversion )
  68.     )
  69.  
  70.     (set #what-to-install (cat "Which parts of the " @app-name " distribution do "
  71.                                "want to install?"
  72.                           )
  73.     )
  74.  
  75.     (set #ask-mainpath (cat "Where should the main program be placed? "
  76.                             "(An additional drawer for the codecs will be created if it doesn't "
  77.                             "exist right now.)"
  78.                        )
  79.     )
  80.     (set #ask-mainpath-help (cat "Please specify a place for the main program "
  81.                                  "\"" @app-name "\". Usually this kind of program "
  82.                                  "lives in \"" #mainprogdir "\". Please notice that "
  83.                                  "an additional drawer for the codecs will be "
  84.                                  "created at that place."
  85.                             )
  86.     )
  87.     (set #ask-docspath (cat "Where should the documentation be placed?\n"
  88.                        )
  89.     )
  90.     (set #ask-docspath-help (cat "Please specify a place for the documentation. "
  91.                                  "Usually AmigaGuides live in \"" #docudir "\"."
  92.                             )
  93.     )
  94.     (set #ask-regfpath (cat "Where should the registration form be placed?\n"
  95.                        )
  96.     )
  97.     (set #ask-regfpath-help (cat "Please specify a place for the registration form. "
  98.                                  "Notice that " @app-name " is Shareware and "
  99.                                  "the unregistered version has many limitations. "
  100.                                  "If you like it, register!"
  101.                             )
  102.     )
  103.     (set #ask-readdocs "\n\n\nDo you want to read the Documentation right now?")
  104.     (set #goodbye (cat "\n\n\n\nGoodbye and have fun with " @app-name "!"))
  105.     (set #goodbye-novice (cat "\n\n\n\nGoodbye and have fun with " @app-name "!\n"
  106.                               "\n\n"
  107.                               "Main Program:  \"" #mainprogdir "\"\n"
  108.                               "Documentation: \"" #docudir "\""
  109.                          )
  110.     )
  111.  
  112.     ;default choices for installation
  113.     (set #choices-default #choices-default-english)
  114.  
  115. ;~~~~~~~~~~~~~~~~~~polish texts~~~~~~~~~~~~~~~~~~
  116.  
  117. ;(set @language "polski") ;for script testing
  118. (if (= @language "polski")
  119.   (
  120.     (set #introduction
  121.       (cat  "\n"
  122.             "Witaj\n"
  123.             "\n"
  124.             "\n"
  125.             "»»» " @app-name " «««\n"
  126.             "\n"
  127.             "\The Ultimate Movie Player for PPC Amigas\n"
  128.             "\n"
  129.             "by Jacek Cybularczyk <noe@webnet.pl>\n"
  130.             "\n"
  131.             "\n"
  132.             "\n"
  133.             "\nWersja do instalacji: " #scversion )
  134.     )
  135.  
  136.     (set #what-to-install (cat "Które pliki z dystrybucji " @app-name " chciaîbyô zainstalowaê?"
  137.                           )
  138.     )
  139.  
  140.     (set #ask-mainpath (cat "Gdzie umieôciê gîówny plik? "
  141.                             "(Bëdzie utworzony dodatkowy katalog dla kodeków.)"
  142.                        )
  143.     )
  144.     (set #ask-mainpath-help (cat "Prosze wskazaê miejsce, gdzie ma byê skopiowany gîówny plik "
  145.                                  "\"" @app-name "\". Proponuje umieôciê go w katalogu "
  146.                                  "\"" #mainprogdir "\". Dodatkowo bëdzie tam utworzony katalog dla "
  147.                                  "kodeków."
  148.                             )
  149.     )
  150.     (set #ask-docspath (cat "Gdzie skopiowaê dokumentacje?\n"
  151.                        )
  152.     )
  153.     (set #ask-docspath-help (cat "Prosze wskazaê miejsce, gdzie ma byê skopiowana dokumentacja. "
  154.                                  "Proponuje umieôciê jâ w katalogu \"" #docudir "\"."
  155.                             )
  156.     )
  157.     (set #ask-regfpath (cat "Gdzie skopiowaê formularz rejestracji?\n"
  158.                        )
  159.     )
  160.     (set #ask-regfpath-help (cat "Prosze wskazaê miejsce, gdzie ma byê skopiowany formularz rejestracji. "
  161.                                  @app-name " jest programem typu Shareware i wersja "
  162.                                  "nie zarejestrowana posiada pewne ograniczenia. "
  163.                                  "Jeûeli masz ochotë, zarejestruj jâ!"
  164.                             )
  165.     )
  166.     (set #ask-readdocs "\n\n\nChciaîbyô przeczytaê teraz dokumentacjë?")
  167.     (set #goodbye (cat "\n\n\n\nÛegnam i ûyczë miîej zabawy z programem " @app-name "!"))
  168.     (set #goodbye-novice (cat "\n\n\n\nÛegnam i ûyczë miîej zabawy z programem " @app-name "!\n"
  169.                               "\n\n"
  170.                               "Program:  \"" #mainprogdir "\"\n"
  171.                               "Dokumentacja: \"" #docudir "\""
  172.                          )
  173.     )
  174.  
  175.     ;default choices for installation
  176.     (set #choices-default #choices-default-polski)
  177.   )
  178. )
  179.  
  180. ;~~~~~~~~~~~~~~~~~~french texts~~~~~~~~~~~~~~~~~~
  181.  
  182. ;(set @language "français") ;for script testing
  183. (if (= @language "français")
  184.   (
  185.     (set #introduction
  186.       (cat  "\n"
  187.             "Bienvenue to\n"
  188.             "\n"
  189.             "\n"
  190.             "»»» " @app-name " «««\n"
  191.             "\n"
  192.             "\Le visualisateur ultime de vidéos pour Amigas PPC\n"
  193.             "\n"
  194.             "par Jacek Cybularczyk <noe@webnet.pl>\n"
  195.             "\n"
  196.             "\n"
  197.             "\n"
  198.             "\nVersion à installer: " #scversion )
  199.     )
  200.  
  201.     (set #what-to-install (cat "Quelle parties de " @app-name " la distribution "
  202.                                "désirez-vous installer?"
  203.                           )
  204.     )
  205.  
  206.     (set #ask-mainpath (cat "Où le programme principal devra-t'il être placé? "
  207.                             "(Un répertoire sera créé pour les codecs si il "
  208.                             "n'existe pas déjà.)"
  209.                        )
  210.     )
  211.     (set #ask-mainpath-help (cat "Spécifiez un emplacement pour le programme principal "
  212.                                  "\"" @app-name "\". Normallement ce genre de programme "
  213.                                  "réside dans \"" #mainprogdir "\". Notez qu'un répertoire "
  214.                                  "sera créé à cet endroit pour le stockage des codecs."
  215.                             )
  216.     )
  217.     (set #ask-docspath (cat "Où la documentation devra-t'elle être placée?\n"
  218.                        )
  219.     )
  220.     (set #ask-docspath-help (cat "Spécifiez un emplacement pour la documentation. "
  221.                                  "Normallement les docs AmigaGuides résident "
  222.                                  "dans \"" #docudir "\"."
  223.                             )
  224.     )
  225.     (set #ask-regfpath (cat "Où le formulaire d'enregistrement devra-t'il être placé?\n"
  226.                        )
  227.     )
  228.     (set #ask-regfpath-help (cat "Spécifiez un emplacement pour le formulaire d'enregistrement. "
  229.                                  "Notez que " @app-name " est Shareware et que "
  230.                                  "la version de démonstration a certaines limitations. "
  231.                                  "Si vous l'appréciez, enregistrez-vous!"
  232.                             )
  233.     )
  234.     (set #ask-readdocs "\n\n\nDésirez-vous lire la documentation maintenant?")
  235.     (set #goodbye (cat "\n\n\n\nAu revoir et amusez-vous avec " @app-name "!"))
  236.     (set #goodbye-novice (cat "\n\n\n\nAu revoir etamusez-vous avec " @app-name "!\n"
  237.                               "\n\n"
  238.                               "Programme principal:  \"" #mainprogdir "\"\n"
  239.                               "Documentation: \"" #docudir "\""
  240.                          )
  241.     )
  242.  
  243.     ;default choices for installation
  244.     (set #choices-default #choices-default-french)
  245.   )
  246. )
  247.  
  248.  
  249.  
  250. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  251. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Installation~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  253.  
  254. ;check for keyfile ==> perhaps skip registration form
  255. (if (exists #keyfilename (noreq))
  256.     (set #choices-default (BITAND #choices-default #choices-default-noregi))
  257. )
  258. (complete 1)
  259.  
  260.  
  261. ; introduction
  262. (message #introduction (all))
  263. (complete 10)
  264.  
  265.  
  266. ;choose user level
  267. (welcome " ")
  268. ;test for user level
  269. (set #novice  (= @user-level 0))
  270. (set #average (= @user-level 1))
  271. (set #expert  (= @user-level 2))
  272. (complete 20)
  273.  
  274.  
  275. (if #expert
  276.     (set #choices (askoptions (prompt #what-to-install) (help #what-to-install-help)
  277.                               (choices (cat @app-name " (Main Program)")
  278.                                        "English Guide" "Français Guide" "Polski Guide"
  279.                                        "English Registration Form" "Polski Registration Form")
  280.                               (default #choices-default)
  281.                   )
  282.     )
  283.     (set #choices #choices-default)
  284. )       
  285. (complete 30)
  286.  
  287.  
  288. ;where to install the main program?
  289. (set #mainpath "")
  290. (if (IN #choices 0)
  291.     (set #mainpath (askdir (prompt #ask-mainpath) (help #ask-mainpath-help)
  292.                            (default #mainprogdir))
  293.     )
  294. )
  295. ;keyfile can be placed at S: or PROGDIR:
  296. ;check at S: was done in the beginning, so check here at #mainpath
  297. (if (AND (OR #novice #average)
  298.          (exists (tackon #mainpath (fileonly #keyfilename)) (noreq)))
  299.     (set #choices (BITAND #choices #choices-default-noregi))
  300.  
  301. )
  302. (complete 50)
  303.  
  304.  
  305. ;where to install the documentation?
  306. (set #docspath "")
  307. (if (OR (IN #choices 1) (IN #choices 2) (IN #choices 3))
  308.     (set #docspath (askdir (prompt #ask-docspath) (help #ask-docspath-help)
  309.                            (default #docudir))
  310.     )
  311. )
  312. (complete 60)
  313.  
  314.  
  315. ;where to install the registration form (if needed)?
  316. (set #regfpath "")
  317. (if (OR (IN #choices 4)
  318.         (IN #choices 5)
  319.     ) 
  320.     (set #regfpath (askdir (prompt #ask-regfpath) (help #ask-regfpath-help)
  321.                            (default (if (<> "" #mainpath)
  322.                                         #mainpath
  323.                                         #mainprogdir
  324.                                     )
  325.                            )
  326.                    )
  327.     )
  328. )
  329. (complete 70)
  330.  
  331.  
  332. ;~~~~~~~~~~~~~~~~~~Copy files~~~~~~~~~~~~~~~~~~
  333. (if (IN #choices 0)
  334.   (copyfiles (prompt "") (help "") (source "") (dest #mainpath)
  335.              (pattern (cat "(" #mainprogfile "|" #datadir ")")) (infos) (noposition) (confirm)
  336.   )
  337. )
  338. (complete 75)
  339.  
  340.  
  341. (if (IN #choices 1)
  342.   (copyfiles (prompt "") (help "") (source #docuenglish) (dest #docspath)
  343.              (infos) (noposition) (confirm)
  344.   )
  345. )
  346. (complete 80)
  347.  
  348. (if (IN #choices 2)
  349.   (copyfiles (prompt "") (help "") (source #docufrench) (dest #docspath)
  350.              (infos) (noposition) (confirm)
  351.   )
  352. )
  353. (complete 85)
  354.  
  355. (if (IN #choices 3)
  356.   (copyfiles (prompt "") (help "") (source #docupolski) (dest #docspath)
  357.              (infos) (noposition) (confirm)
  358.   )
  359. )
  360. (complete 90)
  361.  
  362.  
  363. (if (IN #choices 4)
  364.   (copyfiles (prompt "") (help "") (source #regienglish) (dest #regfpath)
  365.              (infos) (noposition) (confirm)
  366.   )
  367. )
  368. (complete 95)
  369.  
  370. (if (IN #choices 5)
  371.   (copyfiles (prompt "") (help "") (source #regipolski) (dest #regfpath)
  372.              (infos) (noposition) (confirm)
  373.   )
  374. )
  375. (complete 100)
  376.  
  377. (if (askbool (prompt #ask-readdocs) (help "") (default 1))
  378.     (if (= @language "polski")
  379.         (run (prompt "") (help "") (safe) (cat "MultiView " #docupolski ))
  380.         (if (= @language "français")
  381.             (run (prompt "") (help "") (safe) (cat "MultiView " #docufrench ))
  382.             (run (prompt "") (help "") (safe) (cat "MultiView " #docuenglish))
  383.         )
  384.     )
  385. )
  386.  
  387. ; the end
  388. (set @default-dest #mainpath)
  389. (if #novice
  390.     (exit #goodbye-novice)
  391.     (exit #goodbye)
  392. )
  393.